package main

import "fmt"

func divisorGame(N int) bool {
	saveData := make([]bool, N)
	if N == 1 {
		return false
	}
	if N == 2 {
		return true
	}
	saveData[0] = false
	saveData[1] = true
	for i := 2; i < N; i++ {
		flag := true
		for j := 0; j < i; j++ {
			//只要找到的被除数能除尽并且导致输的值就可以胜利
			if saveData[j] == false && (i+1)%(i-j) == 0 {
				saveData[i] = true
				flag = false
				break
			}
		}
		if flag == true {
			saveData[i] = false
		}
	}
	return saveData[N-1]
}

func divisorGame1(N int) bool {
	return N%2 == 0
}

func main() {
	N := 5
	a := divisorGame1(N)
	fmt.Println(a)
}
